<?php
 @header("content-type:text/html;charset=utf-8");
 @header("Access-Control-Allow-Origin:*");
 mysql_connect("localhost:3306","root","root");
 mysql_select_db("1904");
 mysql_query("set character set utf8");
 mysql_query("set names utf8");
 $con=$_GET["con"];
 $order=$_GET["order"];
 $type=$_GET["type"];
 $sql="select * from userinfo where id like '%$con%' or user_name like '%$con%' or user_phone like '%$con%' order by $order $type";
//  $sql="select * from userinfo";
 $result=mysql_query($sql);
 $all=array();
 while($item=mysql_fetch_assoc($result)){
   $all[]=$item;
 }
 print_r(json_encode($all));
?>